<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%--
  Created by IntelliJ IDEA.
  User: k
  Date: 2022/4/1
  Time: 14:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page pageEncoding="utf-8" contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<%--    <script type="text/javascript" src="jquery-3.4.1.min.js">--%>
<%--        $(function () {--%>
<%--            $("a.deleteClass").click(function () {--%>
<%--                return confirm("你确定要删除【" + $(this).parent().parent().find("td:first").text() + "】")--%>
<%--            })--%>
<%--        })--%>
<%--    </script>--%>
</head>
<body>
欢迎${sessionScope.user.sname}，查看学生管理系统<br>
<table border="1">
    <tr>
        <td>序号</td>
        <td>姓名</td>
        <td>密码</td>
        <td>年龄</td>
        <td>地址</td>
        <td colspan="2">操作</td>
    </tr>
    <c:forEach items="${requestScope.Teacher}" var="k">


        <tr>
                <%--            <td>${stu.sno}</td>--%>
            <td>${k.sname}</td>
            <td>${k.pwd}</td>
            <td>${k.age}</td>
            <td>${k.address}</td>
<%--            <td><a href="studentServlet?action=show&sno=${stu.sno}&pageNo=${requestScope.page.pageNo}">修改</a></td>--%>
<%--            <td><a class="deleteClass" href="studentServlet?action=delete&sno=${stu.sno}&pageNo=${requestScope.page.pageNo}">删除</a></td>--%>
        </tr>
    </c:forEach>


    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td><a href="student_Edit.jsp?pageNo=${requestScope.page.pageTotal}">添加学生信息</a></td>
    </tr>
</table>
<%--<div id="page_nav">--%>
<%--    &lt;%&ndash;    如果是第一页就不显示首页&ndash;%&gt;--%>
<%--    <c:if test="${requestScope.page.pageNo>1}">--%>
<%--        <a href="studentServlet?action=pages&pageNo=1">首页</a>--%>
<%--        <a href="studentServlet?action=pages&pageNo=${requestScope.page.pageNo-1}">上一页</a>--%>

<%--    </c:if>--%>
<%--    <c:choose>--%>
<%--        <c:when test="${requestScope.page.pageTotal<=10}">--%>
<%--            <c:forEach begin="1" end="${requestScope.page.pageTotal}" var="i">--%>
<%--                <c:if test="${i==requestScope.page.pageNo}">--%>
<%--                    【${i}】--%>
<%--                </c:if>--%>
<%--                <c:if test="${i!=requestScope.page.pageNo}">--%>
<%--                    <a href="studentServlet?action=pages&pageNo=${i}">${i}</a>--%>
<%--                </c:if>--%>
<%--            </c:forEach>--%>
<%--        </c:when>--%>
<%--    </c:choose>--%>
<%--    &lt;%&ndash;    如果是最后一页就不显示末页&ndash;%&gt;--%>
<%--    <c:if test="${requestScope.page.pageNo<requestScope.page.pageTotal}">--%>
<%--        <a href="studentServlet?action=pages&pageNo=${requestScope.page.pageNo+1}">下一页</a>--%>
<%--        <a href="studentServlet?action=pages&pageNo=${requestScope.page.pageTotal}">末页</a>--%>

<%--    </c:if>--%>
<%--    共${requestScope.page.pageTotal}页，${requestScope.page.pageTotalCount}条记录--%>
<%--    到第<input value="4" name="pn",id="pn_input" height="10px" width="10px"/>页--%>
<%--    <input id="searchpagebtn" type="button" value="确定">--%>
<%--    <script type="text/javascript" src="jquery-3.4.1.min.js">--%>
<%--        $(function () {--%>
<%--            $("#searchpagebtn").click(function () {--%>
<%--                var pageNo=$("#pn_input").value();--%>
<%--                alert(location.href)--%>
<%--                // location.href="http://localhost:8080/managerJsp_war_exploded/studentServlet?action=pages&pageNo="+pageNo--%>
<%--            })--%>
<%--        })--%>
<%--    </script>--%>
</div>

</body>
</html>
